package com.chen.springboot.service.Impl.uniapp;

import com.chen.springboot.dto.uniapp.CategoryItem;
import com.chen.springboot.mapper.uniapp.CategoryItemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryItemService {

    @Autowired
    private CategoryItemMapper categoryItemMapper;

    // 获取所有分类项
    public List<CategoryItem> getCategoryItems() {
        return categoryItemMapper.findAllCategoryItems();
    }

    // 根据关键词搜索分类项
    public List<CategoryItem> searchCategoryItemsByKeyword(String keyword) {
        return categoryItemMapper.searchCategoryItemsByKeyword(keyword);
    }
}
